﻿<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<%
checkadmin(1)
dim ids,listtype,from,tablename,upper,pos,typeid,path
upper=HTMLEncode(request.Form("upper"))
ids=request.form("id")
listtype=request.Form("listtype")
S_LANG=GetIntQueryString("lang")
pos=Instr(upper, "_")
typeid=CInt(mid(upper,1,pos-1))
path=mid(upper,pos+1)
select case listtype
	case "product":
		tablename="c_product"
		from="product_list.asp"
	case "article":
		tablename="c_article"
		from="article_list.asp"
	case "photo":
		tablename="c_photo"
		from="photo_list.asp"
	Case "comment":
		tablename="c_comment"
		from="comment_list.asp"
end select
Dim rs,sql
Set rs = server.CreateObject("adodb.recordset")
sql="select * from ["&tablename&"] where id in ( " & ids & ")"
rs.open sql,conn,1,3
Do While Not rs.eof
rs("typeid")=typeid
rs("path")=path
rs("modifytime")=Now()
rs.update
rs.movenext
Loop 
rs.close
Set rs=Nothing
Call updateTypeModifytime(CutPath(path),Now())
response.redirect("showmsg.asp?from="&from&"&msg=ModifySuccess&lang="&S_LANG)
%>